Width parameter in list() issue

Hello,

I am using the list() perm,

DBE list(DB box,
string label,
[int width,]
int visible,
string values[ ],
[,int noOfValues])

use the first five parameters, and have set the width to 20.

Yet, it does not matter what the width is set to, as the width is set to the width of the dialog box.

 

How do I force the width of a list() to be restricted, versus defaulting to the actual width of the dialog box?

 

Thanks


Gedinfo - Wed Aug 21 14:26:02 EDT 2013

Re: Width parameter in list() issue
GothSloth - Wed Aug 21 17:41:21 EDT 2013

DB top = create( "top" )

string sv[] = { "1", "2", "3", "4", "5" }

list( top, "list", 20, 3, sv )

show( top )

 

The width parameter is the for the number of pixels. 20 appears to be smaller that the min size of the dialog box. I found as I increased the width to values above 110 the dialog box would grow wider.

Running the code below with two list boxes:

DB top = create( "top" )

string sv[] = { "1", "2", "3", "4", "5" }

list( top, "list", 200, 3, sv )

list( top, "list2", 500, 3, sv )

show( top )

I found that both lists would span the entire dialog box and the dialog box width seems to be driven by which ever box is widest.

DB top = create( "top" )

string sv[] = { "1", "2", "3", "4", "5" }

DBE list1 = list( top, "list", 200, 3, sv )

DBE list2 = list( top, "list2", 500, 3, sv )

list1->"right"->"unattached"
list2->"right"->"unattached"

show( top )

 

Adding the placement constraints to unattach the right side of the list looks like it may be what you need. The example above had list 1 shorter than list 2.

 

 

Re: Width parameter in list() issue
Gedinfo - Thu Aug 22 13:46:39 EDT 2013

GothSloth - Wed Aug 21 17:41:21 EDT 2013

DB top = create( "top" )

string sv[] = { "1", "2", "3", "4", "5" }

list( top, "list", 20, 3, sv )

show( top )

 

The width parameter is the for the number of pixels. 20 appears to be smaller that the min size of the dialog box. I found as I increased the width to values above 110 the dialog box would grow wider.

Running the code below with two list boxes:

DB top = create( "top" )

string sv[] = { "1", "2", "3", "4", "5" }

list( top, "list", 200, 3, sv )

list( top, "list2", 500, 3, sv )

show( top )

I found that both lists would span the entire dialog box and the dialog box width seems to be driven by which ever box is widest.

DB top = create( "top" )

string sv[] = { "1", "2", "3", "4", "5" }

DBE list1 = list( top, "list", 200, 3, sv )

DBE list2 = list( top, "list2", 500, 3, sv )

list1->"right"->"unattached"
list2->"right"->"unattached"

show( top )

 

Adding the placement constraints to unattach the right side of the list looks like it may be what you need. The example above had list 1 shorter than list 2.

 

 

Thanks,  using the constraints allows me to actually set the width.

 

Now, if only the perm description could be updated to reflect actual usage!

Re: Width parameter in list() issue
llandale - Thu Aug 22 14:34:03 EDT 2013

Gedinfo - Thu Aug 22 13:46:39 EDT 2013

Thanks,  using the constraints allows me to actually set the width.

 

Now, if only the perm description could be updated to reflect actual usage!

 

  • The larger DBEs tend to come automatically attached to the "form" on the right regardless.  So yes you usually need to right-unattach them.
  •  
  • The "width" does work correctly but the attachment has precedence.  THAT part isn't in the manual.
  •  
  • -Louie
  •  
  • I've written 1000 dialogs and have yet to get one structured correctly the first time.  I write it, I show it, I "could have had a V8" it, and I fix it.  Again.